package ru.spbu.math.seabattle.entity;

import java.io.Serializable;

public class PlayerID implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	public final Long id;

	public PlayerID(long id) {
		this.id = id;
	}
	
	@Override
	public int hashCode() {
		
		return id.hashCode();
	}
	
	@Override
	public boolean equals(Object o) {
		
		if (!(o instanceof PlayerID)) {
			return false;
		}
		PlayerID tmp = (PlayerID) o;
		return this.id.equals(tmp.id);
	}
	
	@Override
	public String toString() {
		
		return id + "";
	}
}
